<title><#if roomuserPager??>编辑<#else>新增</#if>业主房源</title>
<link type="text/css" href="${ctx}/resources/css/demo.css"  rel="stylesheet" />
<link type="text/css" href="${ctx}/resources/css/easyui.css"  rel="stylesheet" />
<script type="text/javascript" src="${ctx}/resources/js/jquery.easyui.min.js"></script>
<script>

</script>
<div class="page-header">
	<h1>
		<#if roomuserPager??>编辑<#else>新增</#if>业主房源
		<small>
			<i class="icon-double-angle-right"></i>
		</small>
	</h1>
</div>
<form class="form-horizontal" role="form" id="validation-form" method="POST" action="${ctx}/admin/roomuser/dosave${suffix}" enctype="multipart/form-data">
<#if roomuserPager??>
	<input type="hidden" name="id" value="${roomuserPager.id}"/>
</#if>
<div class="form-group">
	<label class="control-label col-xs-12 col-sm-3 no-padding-right">所属房间:</label>
	<div class="col-xs-12 col-sm-9">
		<div class="clearfix">
		<@friendly cmd="get_room_list">
			<@ace.formSingleSelect options=roomList checkValue=(roomuserPager.roomId)!-1 name="roomId" listKey="id" listValue="roomNo"/>
		</@friendly>
		</div>
	</div>
</div>

<div class="form-group">
	<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="cardNo">身份证:</label>
	<div class="col-xs-12 col-sm-9">
		<div class="clearfix">
			<span class="block input-icon width-40">
			
				<#if roomuserPager??>
					<input type="text" name="cardNo" value="${roomuserPager.cardNo!}" class="form-control" placeholder=""/>
				<#else>
					<input type="text" name="cardNo" value="" class="form-control" placeholder=""/>
				</#if>
			</span>
		</div>
	</div>
</div>
<div class="form-group">
	<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="tel">手机号:</label>
	<div class="col-xs-12 col-sm-9">
		<div class="clearfix">
			<span class="block input-icon width-40">
			
				<#if roomuserPager??>
					<input type="text" name="tel" value="${roomuserPager.tel!}" class="form-control" placeholder=""/>
				<#else>
					<input type="text" name="tel" value="" class="form-control" placeholder=""/>
				</#if>
			</span>
		</div>
	</div>
</div>
<div class="form-group">
	<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="name">登记人:</label>
	<div class="col-xs-12 col-sm-9">
		<div class="clearfix">
			<span class="block input-icon width-40">
			
				<#if roomuserPager??>
					<input type="text" name="name" value="${roomuserPager.name!}" class="form-control" placeholder=""/>
				<#else>
					<input type="text" name="name" value="" class="form-control" placeholder=""/>
				</#if>
				<i class="icon-user"></i>
			</span>
		</div>
	</div>
</div>
<#-- 
	<div class="form-group">
		<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="remark">备注:</label>
		<div class="col-xs-12 col-sm-9">
			<div class="clearfix">
				<span class="block input-icon width-40">
				<#if roomuserPager??>
					<input type="text" name="remark" value="${roomuserPager.remark!}" class="form-control"/>
				<#else>
					<input type="text" name="remark" value="" class="form-control"/>
				</#if>
				</span>
			</div>
		</div>
	</div>
-->
	<div class="form-group">
		<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="remark">备注:</label>
		<div class="col-xs-12 col-sm-9">
			<div class="clearfix">
				<span class="block input-icon width-40">
					<#if roomuserPager??>
						<textarea rows="5" type="text" name="remark" class="form-control" >${roomuserPager.remark!}</textarea>
					<#else>
						<textarea rows="5" type="text" name="remark" class="form-control" ></textarea>
					</#if>
				</span>
			</div>
		</div>
	</div>

<#--
	<div class="form-group">
		<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="coverPath">图片:</label>
		<div class="col-xs-12 col-sm-9">
			<div class="clearfix">
				<div class="ace-file-input width-40">
				<#if roomuserPager??>
					<input type="file" name="coverPath" id="id-input-file-1" value="${roomuserPager.image!}">
				<#else>
					<input type="file" name="coverPath" id="id-input-file-1" value="">
				</#if>
				</div>
			</div>
		</div>
	</div>
-->
<div class="form-group">
	<div class="col-md-offset-3 col-md-9">
		<button class="btn btn-info" type="submit"><i class="icon-ok bigger-110"></i>提  交</button>
		&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;
		<button class="btn" type="reset"><i class="icon-undo bigger-110"></i>重  置</button>
	</div>
</div>

</fieldset>
</form>
<#if errorMsg??>
	<div class="hr hr-18 hr-double dotted"></div>
	<h4 class="lighter">
		<i class="icon-hand-right icon-animated-hand-pointer red"></i>
		<span class="pink">${errorMsg}
		</span>
	</h4>
</#if>
<script>
var country = Object.create(B.Country);
$(document).ready(function(){
	RP.addBreadcrumb([{name:"基础"}, {name:"<#if roomuserPager??>编辑<#else>新增</#if>业主房源",  active: true}]);
	$('#id-input-file-1').ace_file_input({
		no_file:'没文件 ...',
		btn_choose:'请选择文件',
		btn_change:'重新选择文件',
		droppable:false,
		onchange:null,
		thumbnail:false
	});
	$('#validation-form').validate({
		errorElement: 'div',
		errorClass: 'help-block',
		focusInvalid: true,
		rules: {
		roomId: {
				required: true
			},
		remark: {
				required: true
			}
		},
	
		messages: {
			"roomId":"请填写房间号",
			"remark":"请填写备注"
		},
	
		invalidHandler: function (event, validator) { //display error alert on form submit   
			RP.Form.invalidHandler(event, validator);
		},
	
		highlight: function (e) {
			RP.Form.highlight(e);
		},
		
		errorPlacement: function (error, element) {
			RP.Form.errorPlacement(error, element);	
		},
	
		success: function (e) {
			RP.Form.success(e);	
		},
		
		submitHandler: function(form) {
			RP.Form.submitHandler(form);
		}
	});
});
</script>
